import datetime

from django.conf import settings
from django.conf.urls.defaults import *
from django.contrib import admin
admin.autodiscover()

from views import *

urlpatterns = patterns('',
    ('^polls/', include('polls.urls')),
)

urlpatterns += patterns('',
    # Equivalent to direct_to_template
    ('^$', DirectView()),
                        
    # django batteries
    (r'^accounts/login/$', 'obviews.fallbacks.login'),
    (r'^accounts/logout/$', 'obviews.fallbacks.logout'),
    url(r'^accounts/register/$', Register(), name="register"),
    (r'^static/(?P<path>.*)$', 'django.views.static.serve',
        {'document_root': settings.MEDIA_ROOT, 'show_indexes': True}),
    (r'^admin/doc/', include('django.contrib.admindocs.urls')),
    (r'^admin/', include(admin.site.urls)),
    )
